package com.vincce.sport.entity;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.vincce.sport.core.utils.ConvertUtil;
/**
 * 新闻实体类
 * @author ex-yanjun
 *
 */
public class News {
	private Long id;                 //ID
	private Long teamId;//球队
	private String title;//新闻标题
	private String content;//新闻内容
	private Date newsTime;//新闻时间
	private String newsImg;//新闻图片
	private String specialistImg;//专家图像
	private Integer type;//分类(1,专家点评;2,官网发布;3,赛事新闻;4,场外花絮)
	private Integer status;//新闻状态（1，启用；2，关闭）
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	private String specialist;//专家名
	private Integer createUser;      //创建人
    private Date createTime;         //创建时间
    private Integer updateUser;      //更新人
    private Date updateTime;         //更新时间
    
    //用于页面显示
    private String teamName;//球队名
    private Long teamIds[];
	public String getTeamName() {
		return teamName;
	}
	public void setTeamName(String teamName) {
		this.teamName = teamName;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getNewsImg() {
		return newsImg;
	}
	public void setNewsImg(String newsImg) {
		this.newsImg = newsImg;
	}
	public Integer getCreateUser() {
		return createUser;
	}
	public void setCreateUser(Integer createUser) {
		this.createUser = createUser;
	}
	public String getCreateTime() {
		return ConvertUtil.format("yyyy-MM-dd", createTime);
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Integer getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(Integer updateUser) {
		this.updateUser = updateUser;
	}
	public String getUpdateTime() {
		return ConvertUtil.format("yyyy-MM-dd", updateTime);
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getSpecialist() {
		return specialist;
	}
	public void setSpecialist(String specialist) {
		this.specialist = specialist;
	}
	public Long getTeamId() {
		return teamId;
	}
	public void setTeamId(Long teamId) {
		this.teamId = teamId;
	}
	public String getNewsTime() {
		return ConvertUtil.format("yyyy-MM-dd HH:mm", newsTime);
	}
	public void setNewsTime(String newsTime) throws ParseException{
		if (newsTime instanceof String)
            this.newsTime=new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(newsTime.toString());
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Long[] getTeamIds() {
		return teamIds;
	}
	public void setTeamIds(Long[] teamIds) {
		this.teamIds = teamIds;
	}
	public String getSpecialistImg() {
		return specialistImg;
	}
	public void setSpecialistImg(String specialistImg) {
		this.specialistImg = specialistImg;
	}
	
}
